Skip to content

feat(kms): add auto-onboard support via config#507

Open
Leechael wants to merge 2 commits intomasterfrom
feat/auto-onboard-kms
Open

feat(kms): add auto-onboard support via config#507
Leechael wants to merge 2 commits intomasterfrom
feat/auto-onboard-kms

Conversation

@Leechael
Copy link
Collaborator

Summary

  • Add auto_onboard_url config field to OnboardConfig for automating KMS onboarding from an existing instance
  • When auto_onboard_url is set, the KMS automatically fetches keys from the source on startup, bypassing the Web UI
  • On failure the process exits, relying on docker restart: unless-stopped to retry
  • URL normalization (trim trailing /, ensure /prpc suffix) matches the existing Web UI onboard handler

Test plan

  • cargo check -p dstack-kms passes
  • cargo clippy -p dstack-kms -- -D warnings --allow unused_variables passes
  • Deploy two KMS instances, set auto_onboard_url on the second pointing to the first, verify auto-onboard completes

Add `auto_onboard_url` config to automate KMS onboarding from an
existing instance, removing the need for manual Web UI interaction.
When set, the new KMS automatically fetches keys from the source KMS
on startup. On failure, the process exits so docker restart can retry.
Copy link
Collaborator

@kvinwang kvinwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

};
let keys = Keys::onboard(
&source_url,
&cfg.onboard.auto_bootstrap_domain,
Copy link
Collaborator

@kvinwang kvinwang Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto_bootstrap_domain is optional in config (default is empty), but here it is passed directly as the target domain for Keys::onboard. Could we validate it first (e.g. reject empty/whitespace-only value with a clear error)? Otherwise auto-onboard may generate an unusable cert/domain setup when only auto_onboard_url is set.

— gpt-5.3-codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants